<template>
  <input v-model="data.value" v-on="listens" />
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { Widget } from '@/models'

/** 单行文本框控件 */
export default defineComponent({
  name: 'FaWidgetInput',

  props: {
    /** 控件数据 */
    data: {
      type: Widget,
      required: true
    },

    /** 监听 */
    listens: {
      type: Object as PropType<Record<string, (...rest: any[]) => void>>
    }
  }
})
</script>
